<script setup>
import { onMounted, ref } from "vue";
let imgList = ref();
onMounted(async () => {
  const fileList = await CONTEXTAPI.getFileList();

  imgList.value = fileList;
  console.log(fileList, imgList);
});
</script>

<template>
  <div class="app-container">
    <div class="img-item" v-for="imgItem in imgList" :key="imgItem">
      <img :src="`/uploads/${imgItem}`" alt="">
    </div>
  </div>
</template>

<style lang="scss" scoped>
.app-container {
  display: flex;
  .img-item {
    width: 150px;
    height: 150px;
    margin: 10px;
    img {
      width: 150px;
      height: 150px;
      object-fit:contain;
    }
  }
}
</style>
